package cn.edu.sdjzu.xg.eagle.entity;

public class Teacher implements Comparable <Teacher>{
    private Long id;          // 对应数据库中的 id 字段
    private String name;     // 对应数据库中的 name 字段
    private String no;       // 对应数据库中的 no 字段
    private Department department;

    // 无参构造函数
    public Teacher() {
    }

    // 带参构造函数
    public Teacher(Long id, String name, String no) {
        this.id = id;
        this.name = name;
        this.no = no;
    }

    public Teacher(Long id, String name, Department department) {
        this.id = id;
        this.name = name;
        this.department = department;
    }

    // Getter 和 Setter 方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }
    public void setDepartment(Department department) {
        this.department = department;
    }
    public Department getDepartment() {
        return department;
    }
    // toString 方法，方便打印对象信息
    @Override
    public String toString() {
        return "Teacher{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", no='" + no + '\'' +
                '}';
    }

    @Override
    public int compareTo(Teacher o) {
        return 0;
    }
}
